home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / cvs-1_3.lha / cvs-1.3 / src / myndbm.h < prev    next >
C/C++ Source or Header  |  1992-02-29  |  1KB  |  45 lines

  1. /* @(#)myndbm.h 1.3 92/02/29     */
  2.  
  3. #ifdef MY_NDBM
  4.  
  5. #define    DBLKSIZ    4096
  6.  
  7. typedef struct
  8. {
  9.     List *dbm_list;            /* cached database */
  10.     Node *dbm_next;            /* next key to return for nextkey() */
  11. } DBM;
  12.  
  13. typedef struct
  14. {
  15.     char *dptr;
  16.     int dsize;
  17. } datum;
  18.  
  19. /*
  20.  * So as not to conflict with other dbm_open, etc., routines that may
  21.  * be included by someone's libc, all of my emulation routines are prefixed
  22.  * by "my" and we define the "standard" ones to be "my" ones here.
  23.  */
  24. #define    dbm_open    mydbm_open
  25. #define    dbm_close    mydbm_close
  26. #define    dbm_fetch    mydbm_fetch
  27. #define    dbm_firstkey    mydbm_firstkey
  28. #define    dbm_nextkey    mydbm_nextkey
  29.  
  30. #if __STDC__
  31. DBM *mydbm_open (char *file, int flags, int mode);
  32. void mydbm_close (DBM * db);
  33. datum mydbm_fetch (DBM * db, datum key);
  34. datum mydbm_firstkey (DBM * db);
  35. datum mydbm_nextkey (DBM * db);
  36. #else
  37. DBM *mydbm_open ();
  38. void mydbm_close ();
  39. datum mydbm_fetch ();
  40. datum mydbm_firstkey ();
  41. datum mydbm_nextkey ();
  42. #endif                /* __STDC__ */
  43.  
  44. #endif                /* MY_NDBM */
  45.